<%= javascript_include_tag "admin/overview", defer: true %>

<h1 class="crayons-title mb-4">
  Overview
</h1>
<%= render "notices" %>

<div class="flex flex-col gap-4">
  <div class="flex flex-col l:flex-row gap-4">
    <%= render "analytics" %>
    
    <section class="crayons-card p-7 m:basis-1-3">
      <h2 class="crayons-subtitle-1 mb-6">Deployment</h2>

      <div class="flex flex-col gap-4">
        <div>
          <strong class="color-secondary mr-2">Last deploy</strong>
          <%= ForemInstance.deployed_at %>
        </div>

        <div>
          <strong class="color-secondary mr-2">Latest Commit ID</strong>
          <%= ForemInstance.latest_commit_id || "Not Available" %>
        </div>
      </div>
    </section>
  </div>

  <section class="crayons-card p-7 grid grid-cols-2 gap-7">
    <div>
      <header class="mb-4">
        <h2 class="crayons-subtitle-1">Help</h2>
        <p class="color-secondary">Here are a few things we recommend doing now that you're using Forem!</p>
      </header>

      <ol>
        <li class="mb-1 -ml-4">
          Fully review the
          <a href="https://admin.forem.com" class="c-link c-link--branded">Forem Admin Documentation</a>
          and the latest Forem
          <a href="https://admin.forem.com/docs/getting-started/forem-setup-checklist" class="c-link c-link--branded">Quick Start Guide</a>
        </li>
        <li class="mb-1 -ml-4">
          Set up and configure your Forem
          under <%= link_to "the Config section", admin_config_path, class: "c-link c-link--branded" %>.
        </li>
        <li class="mb-1 -ml-4"><%= link_to "Create a Welcome Thread", admin_welcome_index_path, class: "c-link c-link--branded" %></li>
        <li class="mb-1 -ml-4"><%= link_to "Update and customize your Forem tags", admin_tags_path, class: "c-link c-link--branded" %></li>
        <li class="mb-1 -ml-4">
          <%= link_to "Create pages", admin_pages_path, class: "c-link c-link--branded" %>
          and
          <%= link_to "sort them in the navigation sidebar", admin_navigation_links_path %>.
        </li>
        <li class="mb-1 -ml-4">
          <a href="https://admin.forem.com/docs/advanced-customization/config/authentication" class="c-link c-link--branded">Set your Forem's access level</a>
          and
          <a href="https://admin.forem.com/docs/advanced-customization/config/smtp-settings" class="c-link c-link--branded">email settings</a>.
        </li>
      </ol>
    </div>

    <div>
      <div class="mb-7">
        <h2 class="crayons-subtitle-1">Forem Admin Guide</h2>
        <p class="color-secondary mb-4">This guide gives you the best practices on how you can manage and grow your community on Forem.</p>
        <a href="https://admin.forem.com" target="_blank" class="c-cta">Visit Forem Admin Guide &raquo;</a>
      </div>

      <div>
        <h2 class="crayons-subtitle-1">core.forem.com</h2>
        <p class="color-secondary mb-4">Meet other creators using Forem so that you can share tips with each other.</p>
        <a href="https://core.forem.com" target="_blank" class="c-cta">Join core.forem.com Community &raquo;</a>
      </div>
    </div>
  </section>
</div>
